from django.contrib import admin

from BugManage.models import BugManage, BugHandle


# Register your models here.

@admin.register(BugManage)
class BugManageAdmin(admin.ModelAdmin):
    """
    | 字段          | 类型         | 空   | 默认  | 注释      |
|:----------- |:---------- |:--- | --- | ------- |
| id          | int        | 否   |     | 自增长主键ID |
| interface   | ForeignKey | 否   |     | 接口      |
| create_time | datatime   | 否   |     | 提交时间    |
| desc        | varchar    | 是   |     | bug描述   |
| info        | Json       | 是   |     | bug详细信息 |
| status      | varchar    | 否   |     | bug状态   |
| user        | varchar    | 是   |     | 提交者     |

    """
    list_display = ["id", "interface", "desc", "status", "user", "create_time"]


@admin.register(BugHandle)
class BugHandleAdmin(admin.ModelAdmin):
    list_display = ["id", "bug", "update_user", "create_time"]
